package router

import (
	jwt "gitee.com/sansaniot/ssiot-core/httpmvc/jwtauth"
	"github.com/gin-gonic/gin"
	"ssnotify/internal/notify/apis"
)

func init() {
	RouterCheckRole = append(RouterCheckRole, registerNotifyRecordRouter)
}

func registerNotifyRecordRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	api := apis.NotifyRecord{}
	// 告警配置
	r := v1.Group("/api/notification/record").Use(authMiddleware.MiddlewareFuncWithOutValidate())
	{
		r.GET("/find", api.FindNotifyRecordList)
		r.GET("/subcount", api.GetSubCount)
		r.POST("/read", api.ReadNotifyRecord)
	}
}
